updating oE db_fetch_record
db_fetch_record
include eds.e namespace eds public function db_fetch_record(object key, object table_name = current_table_name)
returns the data for the record with supplied key.
Parameters:
- key : the identifier of the record to be looked up.
- table_name : optional name of table to find key in
Returns:
An integer,
- If less than zero, the record was not found. The returned integer is the opposite of what the record number would have been, had the record been found.
- If equal to zero, an error occured. A sequence, the data for the record.
Errors:
If the current table is not defined, it returns 0.
Comments:
Each record in a Euphoria database consists of a key portion and a data portion. Each of these can be any Euphoria atom or sequence.
Note:
This function does not support records that data consists of a single non-sequence value. In those cases you will need to use db_find_key and db_record_data.
Example 1:
printf(1, "The record['%s'] has data value:\n", {"foo"}) ? db_fetch_record("foo")
See Also:
Not Categorized, Please Help
|